package com.flute.icrawler.framework.processor.result;

import java.rmi.RemoteException;

import com.flute.icrawler.framework.framework.CrawlUrl;
import com.flute.icrawler.framework.framework.ICrawlUrlPool;

public class SuccessProcessorResult extends AbstractProcessResult {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3804001799233765623L;
	private boolean needInterrupt = false;

	@Override
	public void handle(CrawlUrl url, ICrawlUrlPool pool) {
		try {
			pool.success(url);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}

	@Override
	public boolean isNeedInterrupt() {
		return needInterrupt;
	}

	public void setNeedeInterrupt(boolean needInterrupt) {
		this.needInterrupt = needInterrupt;
	}

	@Override
	public boolean isUnique() {
		return true;
	}
}
